package com.siwei.mes.service.laboratory.factory.material;

import com.alibaba.fastjson.JSONObject;
import com.siwei.mes.entity.experiment.CheckBatchConfig;
import com.siwei.mes.entity.experiment.Experiment;
import com.siwei.mes.entity.experiment.ExperimentDetail;
import com.siwei.mes.entity.system.TestProjectInfo;
import com.siwei.mes.entity.system.TestProjectSpecConfig;
import com.siwei.mes.service.laboratory.factory.entity.LaboratoryDownloadVo;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 原材料抽象工厂接口
 *
 * @Description: 原材料抽象工厂接口
 * @Version: 1.0
 * @author: mlchen
 * @date: 2025/3/29 16:27
 */
@Service
public interface MaterialLaboratoryFactory {
    /**
     * 上传到协会
     *
     * @param objJson                   上传的json数据
     * @param sampleNo                  样品编码
     * @param experiment                试验委托信息
     * @param batchConfigList           批检指标配置
     * @param testProjectInfoList       试验项目信息
     * @param testProjectSpecConfigList 试验项目材料规格判定配置
     * @param detail                    试验委托详情信息
     * @param samId                     产品编号
     */
    void processUpload(JSONObject objJson, String sampleNo, Experiment experiment, List<CheckBatchConfig> batchConfigList, List<TestProjectInfo> testProjectInfoList, List<TestProjectSpecConfig> testProjectSpecConfigList, ExperimentDetail detail, String samId);

    /**
     * 处理下载
     *
     * @param sampleNo            样品编码
     * @param experiment          试验委托信息
     * @param detail              试验委托详情信息
     * @param parameterMap        下载数据
     * @param samId               产品编号
     * @param testProjectInfoList
     * @return
     */
    LaboratoryDownloadVo processDownload(String sampleNo, Experiment experiment, ExperimentDetail detail, Map<String, String> parameterMap, String samId, List<TestProjectInfo> testProjectInfoList);
}
